package com.hm.hall.user.controller.resp;


import com.hm.hall.commons.domain.resp.BaseResponse;
import com.hm.hall.commons.constans.ErrorCode;
import com.hm.hall.user.controller.po.SimpUserPO;

/**
 * 第三方接入商登录
 */
public class LoginResp extends BaseResponse {

    /**
     * 用户对象
     */
    public SimpUserPO user;

    /**
     * (必须) |   第三方接入商渠道标示
     */
    public String channel;

    public String sessionToken;
    /**
     * 生成时间
     */
    public long timestamp_L;
    /**
     * 过期时间
     */
    public long failureTime_L;

    /**
     * 最后获得数据时间
     */
    public long lastGetLoginRespTime = 0L;


    public LoginResp() {
    }

    /**
     * @param errorCode
     * @param errMsg
     */
    public LoginResp(int errorCode, String errMsg) {
        super(errorCode, errMsg);
    }

    /**
     * 传入枚举,提供类型检查,  防止出错
     *
     * @param errorCode 错误码枚举
     */
    public LoginResp(ErrorCode errorCode) {
        super(errorCode);
    }

    /**
     * 设置返回500 , 的未知错误
     * e.getMessage() 提示错误
     *
     * @param e
     */
    public LoginResp(Exception e) {
        super(e);
    }

    public SimpUserPO getUser() {
        return user;
    }

    public void setUser(SimpUserPO user) {
        this.user = user;
    }

    public String getSessionToken() {
        return sessionToken;
    }

    public void setSessionToken(String sessionToken) {
        this.sessionToken = sessionToken;
    }

    public long getTimestamp_L() {
        return timestamp_L;
    }

    public void setTimestamp_L(long timestamp_L) {
        this.timestamp_L = timestamp_L;
    }

    public long getFailureTime_L() {
        return failureTime_L;
    }

    public void setFailureTime_L(long failureTime_L) {
        this.failureTime_L = failureTime_L;
    }

    public long getLastGetLoginRespTime() {
        return lastGetLoginRespTime;
    }

    public void setLastGetLoginRespTime(long lastGetLoginRespTime) {
        this.lastGetLoginRespTime = lastGetLoginRespTime;
    }
}

